package demo.pattern.factory.abstractf;

import demo.pattern.factory.entity.KeyBoard;
import demo.pattern.factory.entity.Mouse;

/**
 * @ClassName AbstractFactoryDemo
 * @Description
 * @Author 47980
 * @Date 2020/6/10 20:28
 * @Version V_1.0
 **/
public class AbstractFactoryDemo {
    public static void main(String[] args) {
        ComputerFactory computerFactory = new HpComputerFactory();
        Mouse mouse = computerFactory.createMouse();
        KeyBoard keyBoard = computerFactory.createKeyBoard();
        mouse.sayHi();
        keyBoard.sayHello();
    }
}
